﻿using Saisie_des_prélèvements.Models;
using System;
using System.Linq;


namespace Saisie_des_prélèvements.ViewModels
{
    public class ContractViewModel : ViewModelBase
    {
        #region Properties

        private int cont_id = 0;
        public int ContractId
        {
            get
            { return cont_id; }

            set
            {
                if (cont_id == value)
                { return; }

                cont_id = value;
                RaisePropertyChanged("ContractId");
            }
        }

        private string cont_number = string.Empty;
        public string ContractNumber
        {
            get
            { return cont_number; }

            set
            {
                if (cont_number == value)
                { return; }

                cont_number = value;
                RaisePropertyChanged("ContractNumber");
            }
        }

        private DateTime? date_start;
        public DateTime? DateStart
        {
            get
            { return date_start; }

            set
            {
                if (date_start == value)
                { return; }

                date_start = value;
                RaisePropertyChanged("DateStart");
            }
        }

        private DateTime? date_end;
        public DateTime? DateEnd
        {
            get
            { return date_end; }

            set
            {
                if (date_end == value)
                { return; }

                date_end = value;
                RaisePropertyChanged("DateEnd");
            }
        }

        private string client_to_invoice = string.Empty;
        public string ClientToInvoice
        {
            get
            { return client_to_invoice; }

            set
            {
                if (client_to_invoice == value)
                { return; }

                client_to_invoice = value;
                RaisePropertyChanged("ClientToInvoice");
            }
        }

        private bool? active = false;
        public bool? Active
        {
            get
            { return active; }

            set
            {
                if (active == value)
                { return; }

                active = value;
                RaisePropertyChanged("Active");
            }
        }

        private int? user_create = 0;
        public int? UserCreate
        {
            get
            { return user_create; }

            set
            {
                if (user_create == value)
                { return; }

                user_create = value;
                RaisePropertyChanged("UserCreate");
            }
        }

        private DateTime? date_create = System.DateTime.Today;
        public DateTime? DateCreate
        {
            get
            { return date_create; }

            set
            {
                if (date_create == value)
                { return; }

                date_create = value;
                RaisePropertyChanged("DateCreate");
            }
        }

        #endregion "Properties"
    }
}
